const express = require("express");
const userCtrl = require("../controller/user");
const userValidator = require("../validator/user");
const router = express.Router();

router.post("/register", userValidator.register, userCtrl.register);
router.post("/login", userValidator.loginByName, userCtrl.login);
router.get("/:id", userCtrl.getUserById);

module.exports = router;
